1. Field of the Invention
This invention relates generally to non-volatile memory, and more particularly to improving performance in block based non-volatile memory when performing random small write operations.
2. Description of the Related Art
Non-volatile memory is memory that stores data when power is disconnected from the system. Examples of non-volatile computer memory include Phase-change memory (PCM) and flash memory. Because non-volatile memory retains stored data even when power to the memory is turned off, non-volatile memory is widely used in battery-driven portable devices. For example, non-volatile memory often is utilized in digital audio players, digital cameras, mobile phones, and USB flash drives, which are used for general storage and transfer of data between computers.
Often, non-volatile memory systems are based on blocks of data to increase efficiency when handling large sequential streams of data. However, block based non-volatile memory systems often experience reduced efficiency when handling small and random write streams of data because unlike many other storage devices, non-volatile memory devices generally cannot be overwritten. Hence, to update data in a particular storage location within non-volatile memory, the location must first be erased, then the new data written in its place.
Generally, a memory block is the smallest element of data that can be erased in a block based non-volatile memory system. As a result, when updating data in a non-volatile memory, an entire block must be erased instead of just the particular page or pages of the block that were updated. To increase efficiency, non-volatile memory systems generally create an entirely new memory block having the updated data and remap the logical address of the old memory block to the new physical address of the block. Later, when time allows, the non-volatile memory system erases the old memory block containing the old data.
FIG. 1A is a diagram showing a prior art non-volatile memory 100. The non-volatile system 100 includes a plurality of memory blocks 102, with each memory block comprising a plurality of memory pages 104. To update the data in a page 104a of a memory block 102a, for example, the non-volatile memory controller locates a previously erased memory block, such as memory block 102b, in which to store the data from page 104a once updated. To update the data in memory page 104a, the data from memory page 104a is transferred to the system data buffer, where the data is updated. The updated page data then is read from the system data buffer and written to the corresponding memory page 104a′ in the new memory block 102b. After the updated data is stored in the new page 104a′ of the new block 102b, the remainder of the memory pages from the original memory block 102a are transferred to the new memory block 102b, as illustrated next with reference to FIG. 1B.
FIG. 1B is a diagram showing the prior art non-volatile memory 100 after transferring the remaining data in the original memory block 102a to the new memory block 102b. As above, the non-volatile memory 100 includes a plurality of memory blocks 102, with each memory block comprising a plurality of memory pages 104. Once the update page data is written to the new memory page 102b, the data in the remainder of the memory pages 104b of the original memory block 102a needs to be transferred to the new memory block 102b. Thus, in the example of FIG. 1B, for each of the remaining memory pages 104b of original memory block 102a, the data is transferred from each old memory page 104b to the corresponding new memory page 104b′ in the new memory block 102b. Thereafter, when time permits, the original memory block 102a can be erased.
Unfortunately, this process generally is performed weather an entire memory block is required to be updated or a few bytes are updated. Hence, inefficiencies are encountered when only a few bytes are to be updated. For example, the process described with reference to FIGS. 1A and 1B is performed whether the entire memory page 104a is updated or a single byte of data in memory page 104a is updated. In both cases, the entire memory block 102a is copied to the new memory block 102b. Since an exemplary memory block typically includes sixty-four memory pages, the operations described above require: 1) 1 write of the new page data to the new page 104a′ in the new block 102b, 2) 63 reads for the remaining pages in the original memory block 102a, and 3) 63 writes of the pages to the new memory block 102b. As a result, prior art memory systems generally require 127 page operations to update a single byte of data in a page of memory.
In view of the foregoing, there is a need for systems and methods for improving performance in block based non-volatile memory when performing random small write operations. The systems and methods should allow for effective use of memory, while improving memory performance. In addition, the systems and methods should reduce the amount of time required to perform small update operations by not requiring continuous read and write operations for each small random write operation.